﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

class MyDesignTimeDbContextFactory : IDesignTimeDbContextFactory<SqliteDbContext>
{
	public SqliteDbContext CreateDbContext(string[] args)
	{
		DbContextOptionsBuilder<SqliteDbContext> builder = new();
		// string connStr = Environment.GetEnvironmentVariable("ConnectionStrings:Default");
		// builder.UseSqlServer(connStr);
		string connStr = "Data Source=Db/AgvDb.db";
		builder.UseSqlite(connStr);
		return new SqliteDbContext(builder.Options);
	}

}

